import edu.xust.mapper.RoleMapper;
import edu.xust.pojo.RoleBean;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class DaoTest {
    @Autowired
    RoleMapper roleMapper;
    @Test
    public void testInsert(){
        RoleBean role = new RoleBean();
        role.setIntellige(10);
        role.setUsername("第一");
        role.setSex("男");
        roleMapper.insertRole(role);
    }
}
